<?php
namespace plugin\laoha\app\validate;

use think\Validate;

class TitleContentValidate extends Validate
{
    protected $rule =   [
        'title'  => 'require|max:200',
        'content'   => 'require',
    ];

    protected $message  =   [
        'title.require' => '标题必须',
        'title.max'     => '标题最多不能超过200个字符',
        'content.require'   => '内容必须',
    ];

    
    protected $scene = [
        'create' => ['title','content'],  //必须
        'update' => ['title','content'],  //必须
    ];
}
